﻿@{
    Layout = null;
}
<html>
	<head>
		<script type='text/javascript' src='http://cafenhiepanh.net/content/themes/theme1979/js/jquery-1.7.2.min.js?ver=1.7.2'></script>
	</head>
	<body>
		<div id="step">0</div>
        <div id="stemp">0</div>
		<script>

		    $(document).keydown(function () {
		        sendkey();
		    });

		    function sendkey() {
		        $.get("http://cafenhiepanh.net/home/GetStep/" + ($("#step").html() * 1 + 1), function (data, status) {
		            if (data == "")
		                return;
		            var step = ($("#step").html() * 1 + 1);
		            $("#stemp").html(data + '_' + $("#stemp").html());
		            $("#step").html(step);
		        });
		    }

		    //alert('Start');
		    setInterval(function () {

		        $.get("http://cafenhiepanh.net/home/Sync/" + ($("#step").html() * 1), function (data, status) {
		            if (data == "")
		                return;
		            var step = ($("#step").html() * 1 + 1);
		            $("#stemp").html(data + '_' + $("#stemp").html());
		            $("#step").html(data);
		        });

		    }, 40);


		</script>
	</body>
</html>